class Ability
  include CanCan::Ability

  def initialize(user)
    can :read, :all
    can :search, Document
    can :create, DocumentCorrection
    cannot :read, DocumentCorrection
    can :manage, :all if user && user.admin?
  end
end

